package org.dromara.common.core.service.impl;

import jakarta.annotation.Resource;
import org.dromara.common.core.service.PermissionService;
import org.dromara.system.api.services.SysPermissionApiService;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * @author: zhou shuai
 * @date: 2025/7/12 16:27
 * @version: v1
 */
@Service
public class PermissionServiceImpl implements PermissionService {

    @Resource
    private SysPermissionApiService sysPermissionApiService;

    /**
     * 根据用户ID获取角色数据权限
     *
     * @param userId 用户ID
     */
    @Override
    public Set<String> getRolePermission(Long userId) {
        return sysPermissionApiService.getRolePermission(userId);
    }

    /**
     * 根据用户ID获取角色数据权限
     *
     * @param userId 用户ID
     */
    @Override
    public Set<String> getMenuPermission(Long userId) {
        return sysPermissionApiService.getMenuPermission(userId);
    }

}
